﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Redland2
{
    public class SpeedBoots : Powerup
    {
        #region members
        #endregion members

        #region properties
        #endregion properties

        #region constructors
        public SpeedBoots(GameScene inputScene, int inputIndex, Vector2 inputPos): base(inputScene, inputIndex, inputPos)
        {
            base.Texture = GameScene.Current.Content.Load<Texture2D>("Speed");
            this.Ammount = 2;
            this.Duration = 1200;
        }

        #endregion constructors

        #region methods
        public override Powerup Pickup(Player inputOwner)
        {
            this.Duration = -1;
            inputOwner.Speed += Ammount;
            return base.Pickup(inputOwner);
            //return this;
        }

        public override void Kill()
        {
            if(Owner != null)
                Owner.Speed -= Ammount;
            base.Kill();
        }

        #endregion methods
    }
}
